package com.rmuti.programming.testswt;

import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.Canvas;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

public class TestButton {

	public static void main(String[] args) {
		Display display = new Display();
		Shell shell = new Shell(display);
//		shell.setBounds(50, 50, 600, 400);
//		shell.setSize(300, 580);
		
		

//		Label label = new Label(shell, SWT.NO_BACKGROUND);
//		label.setBounds(shell.getClientArea());
//		label.setBounds(20, 20, 40, 20);
//		label.setText("test");
//		label.setBackground(shell.getClientArea());
//		label.setBackground()

//		Canvas canvas = new Canvas(shell, SWT.PUSH);
//		canvas.setBackground(display.getSystemColor(SWT.COLOR_BLUE));
//		canvas.setBounds(20, 20, 200, 200);
//		canvas.setBackgroundImage(new Image(display,"icons/image/header.gif"));
		
		Image image = new Image(display,"icons/image/btn_back.gif");
		GC gc = new GC(image);
		Rectangle bounds = image.getBounds(); 
		gc.drawImage(image, 50, 50);
		
		
		shell.open();
		while (!shell.isDisposed()) {
			if (!display.readAndDispatch()) {
				display.sleep();
			}
		}

		display.dispose();
	}
}
